3.162 \(\int \cot (c+d x) (a+b \sin (c+d x))^3 \, dx\)

Optimal. Leaf size=67 \[ \frac {a^3 \log (\sin (c+d x))}{d}+\frac {3 a^2 b \sin (c+d x)}{d}+\frac {3 a b^2 \sin ^2(c+d x)}{2 d}+\frac {b^3 \sin ^3(c+d x)}{3 d} \]

[Out]

a^3*ln(sin(d*x+c))/d+3*a^2*b*sin(d*x+c)/d+3/2*a*b^2*sin(d*x+c)^2/d+1/3*b^3*sin(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2721, 43} \[ \frac {3 a^2 b \sin (c+d x)}{d}+\frac {a^3 \log (\sin (c+d x))}{d}+\frac {3 a b^2 \sin ^2(c+d x)}{2 d}+\frac {b^3 \sin ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]*(a + b*Sin[c + d*x])^3,x]

[Out]

(a^3*Log[Sin[c + d*x]])/d + (3*a^2*b*Sin[c + d*x])/d + (3*a*b^2*Sin[c + d*x]^2)/(2*d) + (b^3*Sin[c + d*x]^3)/(
3*d)

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2721

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps

\begin {align*} \int \cot (c+d x) (a+b \sin (c+d x))^3 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {(a+x)^3}{x} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \left (3 a^2+\frac {a^3}{x}+3 a x+x^2\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {a^3 \log (\sin (c+d x))}{d}+\frac {3 a^2 b \sin (c+d x)}{d}+\frac {3 a b^2 \sin ^2(c+d x)}{2 d}+\frac {b^3 \sin ^3(c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 67, normalized size = 1.00 \[ \frac {a^3 \log (\sin (c+d x))}{d}+\frac {3 a^2 b \sin (c+d x)}{d}+\frac {3 a b^2 \sin ^2(c+d x)}{2 d}+\frac {b^3 \sin ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]*(a + b*Sin[c + d*x])^3,x]

[Out]

(a^3*Log[Sin[c + d*x]])/d + (3*a^2*b*Sin[c + d*x])/d + (3*a*b^2*Sin[c + d*x]^2)/(2*d) + (b^3*Sin[c + d*x]^3)/(
3*d)

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 66, normalized size = 0.99 \[ -\frac {9 \, a b^{2} \cos \left (d x + c\right )^{2} - 6 \, a^{3} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) + 2 \, {\left (b^{3} \cos \left (d x + c\right )^{2} - 9 \, a^{2} b - b^{3}\right )} \sin \left (d x + c\right )}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+b*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

-1/6*(9*a*b^2*cos(d*x + c)^2 - 6*a^3*log(1/2*sin(d*x + c)) + 2*(b^3*cos(d*x + c)^2 - 9*a^2*b - b^3)*sin(d*x +
c))/d

________________________________________________________________________________________

giac [A]  time = 0.92, size = 58, normalized size = 0.87 \[ \frac {2 \, b^{3} \sin \left (d x + c\right )^{3} + 9 \, a b^{2} \sin \left (d x + c\right )^{2} + 6 \, a^{3} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) + 18 \, a^{2} b \sin \left (d x + c\right )}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+b*sin(d*x+c))^3,x, algorithm="giac")

[Out]

1/6*(2*b^3*sin(d*x + c)^3 + 9*a*b^2*sin(d*x + c)^2 + 6*a^3*log(abs(sin(d*x + c))) + 18*a^2*b*sin(d*x + c))/d

________________________________________________________________________________________

maple [A]  time = 0.10, size = 64, normalized size = 0.96 \[ \frac {a^{3} \ln \left (\sin \left (d x +c \right )\right )}{d}+\frac {3 a^{2} b \sin \left (d x +c \right )}{d}+\frac {3 a \,b^{2} \left (\sin ^{2}\left (d x +c \right )\right )}{2 d}+\frac {b^{3} \left (\sin ^{3}\left (d x +c \right )\right )}{3 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)*(a+b*sin(d*x+c))^3,x)

[Out]

a^3*ln(sin(d*x+c))/d+3*a^2*b*sin(d*x+c)/d+3/2*a*b^2*sin(d*x+c)^2/d+1/3*b^3*sin(d*x+c)^3/d

________________________________________________________________________________________

maxima [A]  time = 1.20, size = 57, normalized size = 0.85 \[ \frac {2 \, b^{3} \sin \left (d x + c\right )^{3} + 9 \, a b^{2} \sin \left (d x + c\right )^{2} + 6 \, a^{3} \log \left (\sin \left (d x + c\right )\right ) + 18 \, a^{2} b \sin \left (d x + c\right )}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+b*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

1/6*(2*b^3*sin(d*x + c)^3 + 9*a*b^2*sin(d*x + c)^2 + 6*a^3*log(sin(d*x + c)) + 18*a^2*b*sin(d*x + c))/d

________________________________________________________________________________________

mupad [B]  time = 6.68, size = 118, normalized size = 1.76 \[ \frac {b^3\,\sin \left (c+d\,x\right )}{3\,d}-\frac {a^3\,\ln \left (\frac {1}{{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )}{d}+\frac {a^3\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {3\,a\,b^2\,{\cos \left (c+d\,x\right )}^2}{2\,d}-\frac {b^3\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{3\,d}+\frac {3\,a^2\,b\,\sin \left (c+d\,x\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)*(a + b*sin(c + d*x))^3,x)

[Out]

(b^3*sin(c + d*x))/(3*d) - (a^3*log(1/cos(c/2 + (d*x)/2)^2))/d + (a^3*log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2
)))/d - (3*a*b^2*cos(c + d*x)^2)/(2*d) - (b^3*cos(c + d*x)^2*sin(c + d*x))/(3*d) + (3*a^2*b*sin(c + d*x))/d

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sin {\left (c + d x \right )}\right )^{3} \cot {\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)*(a+b*sin(d*x+c))**3,x)

[Out]

Integral((a + b*sin(c + d*x))**3*cot(c + d*x), x)

________________________________________________________________________________________